/**
 * state第一次的值或
 * action代表动作（type,payload）
 */
import { ADD, MINUS } from '../actionType'
export default (state = 100, action) => {
    switch (action.type) {
        case ADD:
            return state + action.payload

        case MINUS:
            return state - action.payload

        default:
            return state
    }

}